# coding=utf8
import copy


class SpiderParams():
    headers = {
        "Connection": "keep-alive",
        "Content-Length": "536",
        "User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36",
        "Content-Type": "application/x-www-form-urlencoded",
        "Accept": "*/*",
        "Accept-Encoding": "gzip, deflate, br",
        "Accept-Language": "zh-CN,zh;q=0.9",
    }

    def generate_comment_info(self):
        url = "https://music.163.com/weapi/v1/resource/comments/R_SO_4_22212233?csrf_token=f77c6d27e23464a071f74765f55eef2a"
        headers = copy.deepcopy(self.headers)
        headers.update({
            "Host": "music.163.com",
            "Origin": "https://music.163.com",
            "Referer": "https://music.163.com/song?id=22212233",
        })
        data = {
            "params": "qXshYQR%2BcJ9j086sFYLFqGEI%2FIcpINGunM7JL6TolkZG%2Fs8NYDpzX2feKYe%2BjDBl0qdWA5OUYFspxu%2BQMdBed2Mf3%2FL9u8FsmtuuNLjsAejCkhf6am2RYdvtgGY%2BXIyZw4%2BYNQS7fTv%2BjbANAfkMyYlCoJQeCuF5DfXukn0H%2Fy1ngnnQJUZgsv5O%2FXoZkDCemyRWvGlbxH%2B5aa2lIcb3NwUFb5JRDS1Ppeccw7FUI3s%3D",
            "encSecKey": "9877aa1cfdd2075689514229dfdf15a97d45dcec50317efeb400b0b85c0b8807651fbb2aa0287cfc66e9d1504fa3030d10f1ca074c8dbc3851a26425777825c627aeee09a70c3533ebd36a93b1acdb467635a45f0208459183877067ae3fc6ce03370942bc8625b872e06676ee35851ff029ac659089631ec381f89592c8bad4"
        }
        return {
            "url": url,
            "data": data,
            "headers": headers,
        }


class Music163Spider():
    def __init__(self):
        pass

